

                     ** System Monitor Source Code **


   1-             ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   2-             ;                                             ;
   3-             ; MDP-80 SYSTEM MONITOR , VERSION 1.0, RTK.   ;
   4-             ; ------------------------------------------- ;
   5-             ;                                             ;
   6-             ; LAST MOD:  11.10.93                         ;
   7-             ;                                             ;
   8-             ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   9-            
  10-             ;
  11-             ;  TO BE ADDED:		LIST TO HANDLE RELATIVE INSTRUCTIONS PROPERLY
  12-             ;
  13-            
  14-            
  15-             #ORG F800			    	; START OF MONITOR
  16-            
  17-            
  18-             ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  19-             ;                                                         ;
  20-             ;                     MONITOR EQUATES                     ;
  21-             ;                                                         ;
  22-             ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  23-            
  24-            
  25-             #EQU  KOUT   0200			; CHARACTER OUT
  26-             #EQU  CSTB   0201			; CHARACTER OUT STROBE
  27-             #EQU  KBDS   0202			; KEYBOARD STROBE
  28-             #EQU  KEYB   0203			; KEYBOARD CHARACTER
  29-             #EQU  STAK   0100			; START OF STACK
  30-             #EQU  COLD   FFFD			; CPU COLD START
  31-             #EQU  BREAK  FFFA           ; BRK VECTOR
  32-             #EQU  TEXT   0300			; TEXT INPUT BUFFER
  33-             #EQU  ZERO   0000			; ENTRANCE TO EXTERNAL ROUTINES
  34-            
  35-            
  36-             ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  37-             ;                                                         ;
  38-             ;                  MAIN MONITOR ROUTINE                   ;
  39-             ;                                                         ;     
  40-             ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  41-            
  42-             ; MONITOR COLD START - PRINTS STARTUP MESSAGE
  43-            
  44-  F800: A9 0C       ._MON		LDA #0C						; CLEAR THE SCREEN
  45-  F802: 20 F8 76    JSR _COUT
  46-  F805: A9 F8       LDA >MESSAGE				; GET HIGH BYTE
  47-  F807: A8 0F       LDX <MESSAGE				; AND LOW BYTE
  48-  F809: 20 F8 D2    JSR _PRINT					; PRINT THE TEXT
  49-  F80C: 4C F8 32    JMP _MON1					; SKIP OVER TEXT
  50-  F80F: 4D44502D3830204D6F6E69746F7220524F4D   .MESSAGE	ASC 'MDP-80 Monitor ROM'	; STARTUP MESSAGE
  51-  F821: 2076657273696F6E20312E30   ASC ' version 1.0'
  52-  F82D: 0D0D00   HEX 0D0D00					; NULL IS END-OF-STRING MARKER
  53-  F830: 0100   .VERSION    HEX 0100                    ; MONITOR VERSION - 01.00
  54-            
  55-             ; MONITOR WARM START - INPUT A LINE AND EXECUTE IT
  56-            
  57-  F832: A9 20       ._MON1		LDA #20						; SET UP GO VECTOR
  58-  F834: C6 00       STA $00
  59-  F836: A9 60       LDA #60
  60-  F838: C6 03       STA $03
  61-  F83A: 20 F8 84    JSR _INPUT					; PRINT PROMPT & GET LINE
  62-  F83D: A9 03       LDA >TEXT
  63-  F83F: A8 00       LDX <TEXT
  64-  F841: 20 F9 28    JSR _UPPER					; MAKE LINE UPPERCASE
  65-  F844: A9 03       LDA >TEXT
  66-  F846: A8 00       LDX <TEXT
  67-  F848: 20 F9 52    JSR _KILLB					; REMOVE BLANKS
  68-  F84B: 20 FA 60    JSR _EXECUTE				; EXECUTE LINE
  69-  F84E: 4C F8 32    JMP _MON1					; AND GET THE NEXT COMMAND
  70-            
  71-             ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;			
  72-             ;                                                         ;
  73-             ;                 SUBROUTINE DEFINITIONS                  ;
  74-             ;                                                         ;
  75-             ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  76-            
  77-             ;
  78-             ; _BRK		OUTPUT REGISTER VALUES AND JUMP TO _MON1
  79-             ;
  80-            
  81-  F851: 20 FF 7F    ._BRK		JSR _REG
  82-  F854: A9 F8       LDA >STRNG
  83-  F856: A8 5E       LDX <STRNG
  84-  F858: 20 F8 D2    JSR _PRINT
  85-  F85B: 4C F8 67    JMP NXTBRK
  86-  F85E: 427265616B204020   .STRNG		ASC 'Break @ '
  87-  F866: 00   HEX 00
  88-  F867: C0 01       .NXTBRK		LDA $01
  89-  F869: C2 02       LDX $02
  90-  F86B: 20 F9 20    JSR _PRINTWORD
  91-  F86E: A9 0D       LDA #0D
  92-  F870: 20 F8 76    JSR _COUT
  93-  F873: 4C F8 32    JMP _MON1
  94-            
  95-             ;
  96-             ; _COUT		PRINT CHARACTER IN A
  97-             ;
  98-            
  99-  F876: B9 02 00    ._COUT		STA KOUT					; STORE A IN KOUT
 100-  F879: 46 02 01    INC CSTB					; OUTPUT CHARACTER
 101-  F87C: 60          RTS
 102-            
 103-             ;
 104-             ; _KEYIN	GET A CHARACTER FROM THE KEYBOARD
 105-             ;
 106-            
 107-  F87D: 46 02 02    ._KEYIN		INC KBDS					; SET KEYBOARD IN STROBE
 108-  F880: AA 02 03    LDA KEYB					; PUT KEY INTO A
 109-  F883: 60          RTS
 110-            
 111-             ;			
 112-             ; _INPUT	INPUT A LINE OF TEXT TO $0300 (TEXT).  X HOLDS LENGTH ON EXIT.
 113-             ;
 114-            
 115-  F884: A9 2A       ._INPUT		LDA #2A						; * PROMPT
 116-  F886: 20 F8 76    JSR _COUT
 117-  F889: A8 00       ._INPUT1	LDX #00						; CLEAR LENGTH COUNTER
 118-  F88B: 20 F8 7D    .LOOP		JSR _KEYIN					; GET A CHARACTER
 119-  F88E: 20 F8 76    JSR _COUT					; AND ECHO IT
 120-  F891: BD 03 00    STA TEXT,X					; PUT IN BUFFER
 121-  F894: 88 0D       CMP #0D						; IS IT RETURN?
 122-  F896: D3 F8 BD    BEQ DONE					; YES, EXIT
 123-  F899: 88 08       CMP #08						; IS IT BACKSPACE?
 124-  F89B: D3 F8 AA    BEQ DEL						; YES, DELETE CHARACTER
 125-  F89E: 88 7F       CMP #7F						; IS IT DELETE?
 126-  F8A0: D3 F8 AA    BEQ DEL						; YES, DELETE CHARACTER
 127-  F8A3: E8          INX							; READY FOR NEXT CHARACTER
 128-  F8A4: D3 F8 BD    BEQ DONE					; IS X>FF? IF SO THEN DONE
 129-  F8A7: 4C F8 8B    JMP LOOP					; GET ANOTHER CHARACTER
 130-  F8AA: 86 00       .DEL		CPX #00						; ANYTHING TO DELETE?
 131-  F8AC: D3 F8 8B    BEQ LOOP					; NO
 132-  F8AF: C7          DEX							; DELETE CHAR IN BUFFER
 133-  F8B0: A9 20       LDA #20     				; PRINT A BLANK
 134-  F8B2: 20 F8 76    JSR _COUT					; TO CLEAR DELETED CHARACTER
 135-  F8B5: A9 08       LDA #08						; AND BACK UP
 136-  F8B7: 20 F8 76    JSR _COUT					; AGAIN
 137-  F8BA: 4C F8 8B    JMP LOOP					; GET MORE CHARACTERS
 138-  F8BD: 86 00       .DONE		CPX #00						; NEED TO ADJUST LENGTH?
 139-  F8BF: D3 F8 CA    BEQ NOCHAR					; NO CHARACTERS
 140-  F8C2: A9 00       LDA #00						; PUT A 0 IN A
 141-  F8C4: BD 03 00    STA TEXT,X					; AND STORE AFTER STRING
 142-  F8C7: 4C F8 D0    JMP FINISH					; AND FINISH
 143-  F8CA: B8 03 00    .NOCHAR		STX TEXT					; SPECIAL CASE
 144-  F8CD: 4C F8 D1    JMP END						; OF NO CHARACTERS
 145-  F8D0: C7          .FINISH		DEX							; ADJUST LENGTH			
 146-  F8D1: 60          .END		RTS
 147-            
 148-             ;
 149-             ; _PRINT	PRINT A NULL TERMINATED STRING STARTING AT A (HIGH) & X (LOW)
 150-             ;
 151-            
 152-  F8D2: C6 06       ._PRINT		STA $06						; PUT IN STRING ADDRESS IN SCRATCH
 153-  F8D4: C8 07       STX $07						; LOW BYTE TOO
 154-  F8D6: A8 00       .PRINT1		LDX #00						; CLEAR COUNTER AND PRINT
 155-  F8D8: 61 00 06    .LOOP2		LDA ($0006),X				; GET A CHARACTER
 156-  F8DB: D3 F8 E8    BEQ DONE2					; NULL SO EXIT
 157-  F8DE: 20 F8 76    JSR _COUT					; PRINT CHARACTER
 158-  F8E1: E8          INX							; MOVE TO NEXT CHARACTER IN STRING
 159-  F8E2: D3 F8 E8    BEQ DONE2					; PRINTED 255, EXIT
 160-  F8E5: 4C F8 D8    JMP LOOP2					; PRINT ANOTHER CHARACTER
 161-  F8E8: 60          .DONE2		RTS
 162-            
 163-             ;
 164-             ;  _PRINTHEX	OUTPUT A AS A HEXADECIMAL NUMBER, A IS UNCHANGED
 165-             ;
 166-            
 167-  F8E9: C6 06       ._PRINTHEX	STA $06     				; MONITOR SCRATCH LOCATION
 168-  F8EB: A0 F0       AND #F0						; MASK LSN
 169-  F8ED: 29          RSH							; AND MOVE MSN TO LSN
 170-  F8EE: 29          RSH
 171-  F8EF: 29          RSH
 172-  F8F0: 29          RSH
 173-  F8F1: 88 09       CMP #09    	 				; GREATER THAN 9?
 174-  F8F3: D9 F8 FF    BGT HEX1					; YES, OUTPUT LETTER
 175-  F8F6: 54          CLC							; NO, ADD $30 TO GET
 176-  F8F7: A5 30       ADC #30						; ASCII FOR DIGIT
 177-  F8F9: 20 F8 76    JSR _COUT					; PRINT FIRST DIGIT
 178-  F8FC: 4C F9 05    JMP NEXT					; GO TO NEXT DIGIT
 179-  F8FF: 54          .HEX1		CLC         				; ADD $37 TO 
 180-  F900: A5 37       ADC #37     				; GET LETTER
 181-  F902: 20 F8 76    JSR _COUT					; AND PRINT DIGIT
 182-  F905: C0 06       .NEXT		LDA $06						; GET ORIGINAL FROM SCRATCH
 183-  F907: A0 0F       AND #0F						; KILL UPPER BITS
 184-  F909: 88 09       CMP #09     				; GREATER THAN 9?
 185-  F90B: D9 F9 17    BGT HEX2					; YES, OUTPUT LETTER
 186-  F90E: 54          CLC							; NO, ADD $30 TO GET
 187-  F90F: A5 30       ADC #30						; ASCII FOR DIGIT
 188-  F911: 20 F8 76    JSR _COUT					; PRINT SECOND DIGIT
 189-  F914: 4C F9 1D    JMP END2					; GO TO NEXT DIGIT
 190-  F917: 54          .HEX2		CLC        					; ADD $37 TO 
 191-  F918: A5 37       ADC #37    	 				; GET LETTER
 192-  F91A: 20 F8 76    JSR _COUT					; AND PRINT DIGIT
 193-  F91D: C0 06       .END2		LDA $06						; RECOVER INITIAL A VALUE
 194-  F91F: 60          RTS							; EXIT
 195-            
 196-             ;
 197-             ;  _PRINTWORD 	OUTPUTS A & X AS 16-BIT NUMBER - DESTROYS A
 198-             ;
 199-            
 200-  F920: 20 F8 E9    ._PRINTWORD	JSR _PRINTHEX				; PRINT A
 201-  F923: 12          TXA							; PUT X IN A
 202-  F924: 20 F8 E9    JSR _PRINTHEX				; PRINT IT
 203-  F927: 60          RTS							; EXIT
 204-            
 205-             ;
 206-             ;  _UPPER  	MAKES THE NULL TERMINATED STRING IN AX UPPERCASE
 207-             ;
 208-            
 209-  F928: C6 06       ._UPPER		STA $06						; PUT IN SCRATCH SPACE
 210-  F92A: C8 07       STX $07
 211-  F92C: A8 00       ._UPPER1	LDX #00						; CLEAR INDEX
 212-  F92E: 61 00 06    .LOOP3		LDA ($0006),X				; GET A CHARACTER
 213-  F931: D3 F9 51    BEQ DONE3					; ZERO SO EXIT
 214-  F934: 88 60       CMP #60						; IS A > 'a' ?
 215-  F936: D9 F9 3C    BGT RANGE1					; YES
 216-  F939: 4C F9 4A    JMP NEXT2					; NO, GO TO NEXT LETTER
 217-  F93C: 88 7B       .RANGE1		CMP #7B						; IS A < 'z' ?
 218-  F93E: D7 F9 44    BLT RANGE2					; YES
 219-  F941: 4C F9 4A    JMP NEXT2					; NO, GO TO NEXT LETTER
 220-  F944: 55          .RANGE2		SEC							; IN RANGE
 221-  F945: A4 20       SBC #20						; SUBTRACT DECIMAL 32
 222-  F947: 63 00 06    STA ($0006),X				; PUT IN STRING
 223-  F94A: E8          .NEXT2		INX							; GO TO NEXT LETTER
 224-  F94B: D3 F9 51    BEQ DONE3					; REACHED MAX. LENGTH SO EXIT
 225-  F94E: 4C F9 2E    JMP LOOP3 
 226-  F951: 60          .DONE3		RTS							; EXIT
 227-            
 228-             ;
 229-             ; _KILLB	REMOVE BLANKS FROM THE NULL TERMINATED STRING IN AX
 230-             ;
 231-            
 232-  F952: C6 06       ._KILLB 	STA $06
 233-  F954: C8 07       STX $07
 234-  F956: A8 00       ._KILLB1	LDX #00
 235-  F958: 61 00 06    .LOOPK		LDA ($0006),X				; GET CHARACTER
 236-  F95B: 88 00       CMP #00						; NULL, SO END OF STRING
 237-  F95D: D3 F9 88    BEQ DONEK			
 238-  F960: 88 20       CMP #20						; BLANK, SO KILL IT
 239-  F962: D3 F9 6C    BEQ SHIFT
 240-  F965: E8          INX							; GO TO NEXT CHARACTER
 241-  F966: D3 F9 88    BEQ DONEK					; FINISH IF 255
 242-  F969: 4C F9 58    JMP LOOPK
 243-  F96C: 12          .SHIFT		TXA
 244-  F96D: 13          TAY							; PUT X IN Y TO SAVE IT
 245-  F96E: E8          INX
 246-  F96F: 61 00 06    .LOOPS		LDA ($0006),X				; GET NEXT CHARACTER
 247-  F972: C7          DEX
 248-  F973: 63 00 06    STA ($0006),X				; AND SHIFT OVER ONE
 249-  F976: E8          INX
 250-  F977: E8          INX							; GO TO NEXT CHARACTER
 251-  F978: D3 F9 83    BEQ DONES					; DONE 255
 252-  F97B: 88 00       CMP #00						; WAS IT THE END OF THE STRING?
 253-  F97D: D3 F9 83    BEQ DONES					; YES
 254-  F980: 4C F9 6F    JMP LOOPS					; NO
 255-  F983: 11          .DONES		TYA
 256-  F984: 14          TAX							; RESTORE X
 257-  F985: 4C F9 58    JMP LOOPK					; CONTINUE
 258-  F988: 60          .DONEK		RTS
 259-            
 260-             ;
 261-             ; _LENGTH	FINDS THE LENGTH OF THE NULL TERMINATED STRING THAT STARTS
 262-             ;    		AT THE ADDRESS IN $06 & $07.  THE LENGTH IS RETURNED IN X
 263-             ;
 264-            
 265-  F989: A8 00       ._LENGTH	LDX #00						; CLEAR X
 266-  F98B: 61 00 06    .LOOPL		LDA ($0006),X				; GET CHARACTER
 267-  F98E: D3 F9 9A    BEQ QUIT					; LAST CHARACTER, EXIT
 268-  F991: E8          INX
 269-  F992: D3 F9 98    BEQ MAX						; 255 CHARACTERS
 270-  F995: 4C F9 8B    JMP LOOPL
 271-  F998: A8 FF       .MAX		LDX #FF						; INDICATE MAXIMUM LENGTH
 272-  F99A: 60          .QUIT		RTS
 273-            
 274-             ;
 275-             ; _MAKEHEX	CONVERTS THE ASCII CHARACTER IN A INTO A HEX DIGIT
 276-             ;			IT SETS $05 TO ZERO IF NOT A DIGIT.  USES Y.
 277-            
 278-  F99B: 88 3A       ._MAKEHEX	CMP #3A						; IS A < '9'+1 ?
 279-  F99D: D7 F9 B0    BLT DIGIT1					; YES, CONVERT IT AS NUMBER
 280-  F9A0: 88 41       CMP #41						; IS A < 'A' ?
 281-  F9A2: D7 F9 BE    BLT ERRM
 282-  F9A5: 88 46       CMP #46						; IS A > 'F' ?
 283-  F9A7: D9 F9 BE    BGT ERRM
 284-  F9AA: 55          SEC
 285-  F9AB: A4 37       SBC #37						; SUBTRACT TO GET VALUE
 286-  F9AD: 4C F9 C2    JMP DONEH
 287-  F9B0: 88 2F       .DIGIT1	    CMP #2F						; IS A > '0'-1 ?
 288-  F9B2: D9 F9 B8    BGT OK1
 289-  F9B5: 4C F9 BE    JMP ERRM	
 290-  F9B8: 55          .OK1		SEC
 291-  F9B9: A4 30       SBC #30						; SUBTR. TO GET VALUE
 292-  F9BB: 4C F9 C2    JMP DONEH
 293-  F9BE: A6 00       .ERRM		LDY #00
 294-  F9C0: CA 05       STY $05						; SET FLAG
 295-  F9C2: 60          .DONEH		RTS
 296-            
 297-             ;
 298-             ; _MAKEBYTE	TAKES TWO DIGITS FROM STRING IN $06 & $07 AND CREATES
 299-             ;			A BYTE WHICH IS STORED IN $04.  INCREMENTS X.
 300-             ;
 301-            
 302-  F9C3: 61 00 06    ._MAKEBYTE	LDA ($0006),X				; GET FIRST DIGIT
 303-  F9C6: 20 F9 9B    JSR _MAKEHEX				; CONVERT TO HEX
 304-  F9C9: 26          LSH							; SHIFT TO UPPER NIBBLE
 305-  F9CA: 26          LSH
 306-  F9CB: 26          LSH
 307-  F9CC: 26          LSH
 308-  F9CD: C6 04       STA $04
 309-  F9CF: E8          INX
 310-  F9D0: 61 00 06    LDA ($0006),X
 311-  F9D3: 20 F9 9B    JSR _MAKEHEX
 312-  F9D6: 54          CLC
 313-  F9D7: B5 00 04    ADC $0004					; ADD
 314-  F9DA: C6 04       STA $04						; BYTE COMPLETED
 315-  F9DC: 60          RTS
 316-            
 317-             ;
 318-             ; _NUMBER	CONVERTS THE NULL TERMINATED STRING IN AX INTO AN ADDRESS
 319-             ;    		AND PLACES IT IN THE MONITOR SCRATCH LOCATIONS ($01 & $02)
 320-             ;			STORES RESULT OF CONVERSION IN $05 ( 0 = ERROR, 1 = OKAY )
 321-             ;           
 322-            
 323-  F9DD: C6 06       ._NUMBER	STA $06
 324-  F9DF: C8 07       STX $07
 325-  F9E1: A8 00       ._NUMBER1	LDX #00
 326-  F9E3: C8 05       STX $05 
 327-  F9E5: 46 00 05    INC $0005					; SET FOR NO ERROR INITIALLY
 328-  F9E8: 20 F9 89    JSR _LENGTH					; GET THE LENGTH
 329-  F9EB: 86 00       CPX #00						; NO LENGTH - ERROR
 330-  F9ED: D3 FA 4C    BEQ ERRORN
 331-  F9F0: 86 04       CPX #04
 332-  F9F2: D9 FA 4C    BGT ERRORN					; TOO MANY DIGITS
 333-  F9F5: D3 FA 38    BEQ FOURN
 334-  F9F8: 86 03       CPX #03
 335-  F9FA: D3 FA 23    BEQ THREEN
 336-  F9FD: 86 02       CPX #02
 337-  F9FF: D3 FA 13    BEQ TWON
 338-  FA02: A8 00       .ONEN		LDX #00						; SINGLE DIGIT
 339-  FA04: 61 00 06    LDA ($0006),X
 340-  FA07: 20 F9 9B    JSR _MAKEHEX
 341-  FA0A: C6 02       STA $02
 342-  FA0C: A9 00       LDA #00
 343-  FA0E: C6 01       STA $01
 344-  FA10: 4C FA 4F    JMP DONEN
 345-  FA13: A8 00       .TWON		LDX #00						; TWO DIGITS
 346-  FA15: 20 F9 C3    JSR _MAKEBYTE
 347-  FA18: C0 04       LDA $04
 348-  FA1A: C6 02       STA $02
 349-  FA1C: A9 00       LDA #00
 350-  FA1E: C6 01       STA $01
 351-  FA20: 4C FA 4F    JMP DONEN
 352-  FA23: A8 00       .THREEN		LDX #00						; THREE DIGITS
 353-  FA25: 61 00 06    LDA ($0006),X
 354-  FA28: 20 F9 9B    JSR _MAKEHEX
 355-  FA2B: C6 01       STA $01
 356-  FA2D: E8          INX
 357-  FA2E: 20 F9 C3    JSR _MAKEBYTE
 358-  FA31: C0 04       LDA $04
 359-  FA33: C6 02       STA $02
 360-  FA35: 4C FA 4F    JMP DONEN
 361-  FA38: A8 00       .FOURN		LDX #00
 362-  FA3A: 20 F9 C3    JSR _MAKEBYTE				; MAKE A BYTE
 363-  FA3D: C0 04       LDA $04
 364-  FA3F: C6 01       STA $01						; PUT HIGH BYTE IN PLACE
 365-  FA41: E8          INX
 366-  FA42: 20 F9 C3    JSR _MAKEBYTE
 367-  FA45: C0 04       LDA $04
 368-  FA47: C6 02       STA $02						; PUT LOW BYTE IN PLACE
 369-  FA49: 4C FA 4F    JMP DONEN					; EXIT
 370-  FA4C: 45 00 05    .ERRORN		DEC $0005					; SET ERROR
 371-  FA4F: 60          .DONEN		RTS		
 372-            
 373-             ;
 374-             ; _ADD16	ADD THE SIXTEEN BIT NUMBER IN $01 & $02 TO THE SIXTEEN BIT
 375-             ; 			NUMBER IN $0A & $0B.  RESULT IN $01 & $02.
 376-             ;
 377-            
 378-  FA50: 54          ._ADD16		CLC
 379-  FA51: C0 02       LDA $02
 380-  FA53: B5 00 0B    ADC $000B
 381-  FA56: C6 02       STA $02
 382-  FA58: C0 01       LDA $01
 383-  FA5A: B5 00 0A    ADC $000A
 384-  FA5D: C6 01       STA $01
 385-  FA5F: 60          RTS
 386-            
 387-             ;
 388-             ; _EXECUTE	EXECUTES THE COMMAND IN THE TEXT BUFFER
 389-             ;
 390-             ;  COMMANDS ARE: 
 391-             ;
 392-             ;       G <ADDRESS>			-	GO AT ADDRESS
 393-             ;		L <ADDRESS>			-	LIST 25 LINES STARTING @ ADDRESS (DISASSEMBLED)
 394-             ;	    S <ADDRESS>			-	SUBSTITUTE/VIEW MEMORY @ ADDRESS
 395-             ;	    X <ADDRESS>			-	HEX DUMP A SCREEN IN STARTING @ ADDRESS
 396-             ;       !					-   CLEAR THE SCREEN & HOME CURSOR
 397-             ;       <ADDRESS>			-	SHOW THE CONTENTS OF <ADDRESS>
 398-             ;
 399-            
 400-  FA60: AA 03 00    ._EXECUTE	LDA TEXT					; GET FIRST LETTER OF COMMAND
 401-  FA63: 88 00       CMP #00						; NULL LINE
 402-  FA65: D3 FF 7E    BEQ DONE4					; EXIT
 403-  FA68: 88 47       CMP #47						; G - GO
 404-  FA6A: D3 FA 9B    BEQ GO
 405-  FA6D: 88 4C       CMP #4C						; L - LIST
 406-  FA6F: D3 FA AB    BEQ LIST
 407-  FA72: 88 53       CMP #53						; S - SUBSTITUTE
 408-  FA74: D3 FE 99    BEQ CHANGE
 409-  FA77: 88 58       CMP #58						; X - DUMP
 410-  FA79: D3 FF 0E    BEQ DUMP
 411-  FA7C: 88 21       CMP #21
 412-  FA7E: D3 FF 79    BEQ HOME					; ! - HOME
 413-  FA81: A9 03       LDA #03
 414-  FA83: A8 00       LDX #00
 415-  FA85: 20 F9 DD    JSR _NUMBER					; IS IT AN ADDRESS?
 416-  FA88: C0 05       LDA $05						; ERROR CODE
 417-  FA8A: D3 FA 90    BEQ GARBAGE					; =0 , GARBAGE
 418-  FA8D: 4C FF 5B    JMP ADDR					; SHOW CONTENTS OF ADDRESS
 419-            
 420-  FA90: A9 3F       .GARBAGE    LDA #3F						; UNKNOWN, PRINT ? AND RETURN
 421-  FA92: 20 F8 76    JSR _COUT
 422-  FA95: A9 0D       LDA #0D
 423-  FA97: 20 F8 76    JSR _COUT
 424-  FA9A: 60          RTS
 425-            
 426-  FA9B: A9 03       .GO			LDA #03						; EXECUTE A ROUTINE
 427-  FA9D: A8 01       LDX #01
 428-  FA9F: 20 F9 DD    JSR _NUMBER					; CONVERT ADDRESS
 429-  FAA2: C0 05       LDA $05						; GET CONVERSION FLAG
 430-  FAA4: D3 FA 90    BEQ GARBAGE					; IF = 0 THEN ERROR
 431-  FAA7: 20 00 00    JSR ZERO					; NO ERROR, EXECUTE
 432-  FAAA: 60          RTS							; AND RETURN TO MONITOR
 433-            
 434-  FAAB: A9 00       .LIST		LDA #00
 435-  FAAD: C6 0A       STA $0A
 436-  FAAF: AE          INA
 437-  FAB0: C6 0B       STA $0B						; STORE A 1 FOR INCREMENTING ADDRESS
 438-  FAB2: A9 03       LDA #03
 439-  FAB4: A8 01       LDX #01
 440-  FAB6: 20 F9 DD    JSR _NUMBER					; CONVERT ADDRESS
 441-  FAB9: C0 05       LDA $05
 442-  FABB: D3 FA 90    BEQ GARBAGE
 443-  FABE: A6 10       LDY #10						; LINE COUNT
 444-  FAC0: A8 00       .LOOPLIST	LDX #00
 445-  FAC2: 61 00 01    LDA ($0001),X				; GET A BYTE
 446-  FAC5: 14          TAX
 447-  FAC6: AD FB FA    LDA TYPE,X				; GET LENGTH/TYPE
 448-  FAC9: C6 1A       STA $1A
 449-  FACB: AD FC FA    LDA OFFSET,X				; GET OFFSET TO LABEL
 450-  FACE: C6 1B       STA $1B
 451-  FAD0: C0 01       LDA $01
 452-  FAD2: C2 02       LDX $02
 453-  FAD4: 20 F9 20    JSR _PRINTWORD				; PRINT ADDRESS
 454-  FAD7: A9 2D       LDA #2D						; '-'
 455-  FAD9: 20 F8 76    JSR _COUT
 456-  FADC: A9 20       LDA #20
 457-  FADE: 20 F8 76    JSR _COUT
 458-  FAE1: A8 00       LDX #00
 459-  FAE3: 61 00 01    LDA ($0001),X
 460-  FAE6: C6 1C       STA $1C
 461-  FAE8: 20 F8 E9    JSR _PRINTHEX				; PRINT 1ST BYTE
 462-  FAEB: A9 20       LDA #20
 463-  FAED: 20 F8 76    JSR _COUT
 464-  FAF0: C0 1A       LDA $1A
 465-  FAF2: A0 F0       AND #F0
 466-  FAF4: 54          CLC
 467-  FAF5: 29          RSH
 468-  FAF6: 29          RSH
 469-  FAF7: 29          RSH
 470-  FAF8: 29          RSH
 471-  FAF9: 88 01       CMP #01
 472-  FAFB: D3 FB 28    BEQ ONEBYTE
 473-  FAFE: 88 02       CMP #02
 474-  FB00: D3 FB 30    BEQ TWOBYTE
 475-  FB03: 20 FA 50    JSR _ADD16
 476-  FB06: A8 00       LDX #00
 477-  FB08: 61 00 01    LDA ($0001),X
 478-  FB0B: C6 1D       STA $1D
 479-  FB0D: 20 F8 E9    JSR _PRINTHEX
 480-  FB10: A9 20       LDA #20
 481-  FB12: 20 F8 76    JSR _COUT
 482-  FB15: 20 FA 50    JSR _ADD16
 483-  FB18: 61 00 01    LDA ($0001),X
 484-  FB1B: C6 1E       STA $1E
 485-  FB1D: 20 F8 E9    JSR _PRINTHEX
 486-  FB20: A9 20       LDA #20
 487-  FB22: 20 F8 76    JSR _COUT
 488-  FB25: 4C FB 42    JMP PRINTLABEL
 489-  FB28: A8 06       .ONEBYTE	LDX #06
 490-  FB2A: 20 FF D8    JSR _BLANKS
 491-  FB2D: 4C FB 42    JMP PRINTLABEL
 492-  FB30: 20 FA 50    .TWOBYTE	JSR _ADD16
 493-  FB33: A8 00       LDX #00
 494-  FB35: 61 00 01    LDA ($0001),X
 495-  FB38: C6 1D       STA $1D
 496-  FB3A: 20 F8 E9    JSR _PRINTHEX
 497-  FB3D: A8 04       LDX #04
 498-  FB3F: 20 FF D8    JSR _BLANKS
 499-  FB42: C2 1B       .PRINTLABEL	LDX $1B
 500-  FB44: AD FD FA    LDA LABELS,X
 501-  FB47: 20 F8 76    JSR _COUT
 502-  FB4A: E8          INX
 503-  FB4B: AD FD FA    LDA LABELS,X
 504-  FB4E: 20 F8 76    JSR _COUT
 505-  FB51: E8          INX
 506-  FB52: AD FD FA    LDA LABELS,X
 507-  FB55: 20 F8 76    JSR _COUT
 508-  FB58: A9 20       LDA #20
 509-  FB5A: 20 F8 76    JSR _COUT
 510-  FB5D: C0 1A       LDA $1A
 511-  FB5F: A0 0F       AND #0F						; GET INSTRUCTION TYPE
 512-  FB61: 88 00       CMP #00
 513-  FB63: D3 FB 82    BEQ IMMEDIATE
 514-  FB66: 88 01       CMP #01
 515-  FB68: D3 FB 92    BEQ ABSOLUTE
 516-  FB6B: 88 02       CMP #02
 517-  FB6D: D3 FB A1    BEQ ABS.X
 518-  FB70: 88 03       CMP #03
 519-  FB72: D3 FB BA    BEQ ZEROPAGE
 520-  FB75: 88 04       CMP #04
 521-  FB77: D3 FB C7    BEQ RELATIVE
 522-  FB7A: 88 05       CMP #05
 523-  FB7C: D3 FB CA    BEQ INDIRECT
 524-  FB7F: 4C FB EA    .IMPLIED	JMP NXTINSTR				; IMPLIED OR UNKNOWN - END LINE
 525-  FB82: A9 23       .IMMEDIATE	LDA #23						; '#'
 526-  FB84: 20 F8 76    JSR _COUT
 527-  FB87: A8 00       LDX #00
 528-  FB89: 61 00 01    LDA ($0001),X				; DATA
 529-  FB8C: 20 F8 E9    JSR _PRINTHEX
 530-  FB8F: 4C FB EA    JMP NXTINSTR
 531-  FB92: A9 24       .ABSOLUTE	LDA #24						; '$'
 532-  FB94: 20 F8 76    JSR _COUT
 533-  FB97: C0 1D       LDA $1D
 534-  FB99: C2 1E       LDX $1E
 535-  FB9B: 20 F9 20    JSR _PRINTWORD
 536-  FB9E: 4C FB EA    JMP NXTINSTR
 537-  FBA1: A9 24       .ABS.X		LDA #24
 538-  FBA3: 20 F8 76    JSR _COUT
 539-  FBA6: C0 1D       LDA $1D
 540-  FBA8: C2 1E       LDX $1E
 541-  FBAA: 20 F9 20    JSR _PRINTWORD
 542-  FBAD: A9 2C       LDA #2C
 543-  FBAF: 20 F8 76    JSR _COUT
 544-  FBB2: A9 58       LDA #58
 545-  FBB4: 20 F8 76    JSR _COUT
 546-  FBB7: 4C FB EA    JMP NXTINSTR
 547-  FBBA: A9 24       .ZEROPAGE	LDA #24
 548-  FBBC: 20 F8 76    JSR _COUT
 549-  FBBF: C0 1D       LDA $1D
 550-  FBC1: 20 F8 E9    JSR _PRINTHEX
 551-  FBC4: 4C FB EA    JMP NXTINSTR
 552-  FBC7: 4C FB BA    .RELATIVE	JMP ZEROPAGE				; FOR NOW - TREAT AS ZERO PAGE
 553-  FBCA: A9 28       .INDIRECT	LDA #28						; '('
 554-  FBCC: 20 F8 76    JSR _COUT
 555-  FBCF: A9 24       LDA #24
 556-  FBD1: 20 F8 76    JSR _COUT
 557-  FBD4: C0 1D       LDA $1D
 558-  FBD6: C2 1E       LDX $1E
 559-  FBD8: 20 F9 20    JSR _PRINTWORD
 560-  FBDB: A9 29       LDA #29						; ')'
 561-  FBDD: 20 F8 76    JSR _COUT
 562-  FBE0: A9 2C       LDA #2C
 563-  FBE2: 20 F8 76    JSR _COUT
 564-  FBE5: A9 58       LDA #58
 565-  FBE7: 20 F8 76    JSR _COUT
 566-  FBEA: A9 0D       .NXTINSTR	LDA #0D
 567-  FBEC: 20 F8 76    JSR _COUT
 568-  FBEF: C5          DEY
 569-  FBF0: D3 FB F9    BEQ DONELIST
 570-  FBF3: 20 FA 50    JSR _ADD16					; GO TO NEXT ADDRESS
 571-  FBF6: 4C FA C0    JMP LOOPLIST				; AND DO IT AGAIN
 572-  FBF9: 60          .DONELIST	RTS
 573-            
 574-            
 575-  FBFA: 16171717   .TYPE		HEX 16171717	; 00    INSTRUCTION LENGTH/TYPE
 576-  FBFE: 17171716   HEX 17171716	; 04
 577-  FC02: 17171717   HEX 17171717	; 08
 578-  FC06: 17171717   HEX 17171717	; 0C
 579-  FC0A: 16161616   HEX 16161616	; 10
 580-  FC0E: 16171717   HEX 16171717	; 14
 581-  FC12: 17171717   HEX 17171717	; 18
 582-  FC16: 17171717   HEX 17171717	; 1C
 583-  FC1A: 31171717   HEX 31171717	; 20
 584-  FC1E: 17171616   HEX 17171616	; 24
 585-  FC22: 16161717   HEX 16161717	; 28
 586-  FC26: 17171717   HEX 17171717	; 2C
 587-  FC2A: 17171716   HEX 17171716	; 30
 588-  FC2E: 32321617   HEX 32321617	; 34
 589-  FC32: 17171717   HEX 17171717	; 38
 590-  FC36: 16161717   HEX 16161717	; 3C
 591-  FC3A: 17171717   HEX 17171717	; 40
 592-  FC3E: 17313117   HEX 17313117	; 44
 593-  FC42: 17171717   HEX 17171717	; 48
 594-  FC46: 31171717   HEX 31171717	; 4C
 595-  FC4A: 17171717   HEX 17171717	; 50
 596-  FC4E: 16161717   HEX 16161717	; 54
 597-  FC52: 17171717   HEX 17171717	; 58
 598-  FC56: 17171717   HEX 17171717	; 5C
 599-  FC5A: 16351735   HEX 16351735	; 60
 600-  FC5E: 17171717   HEX 17171717	; 64
 601-  FC62: 17171717   HEX 17171717	; 68
 602-  FC66: 17171717   HEX 17171717	; 6C
 603-  FC6A: 17171717   HEX 17171717	; 70
 604-  FC6E: 17171717   HEX 17171717	; 74
 605-  FC72: 17171717   HEX 17171717	; 78
 606-  FC76: 17171717   HEX 17171717	; 7C
 607-  FC7A: 17171717   HEX 17171717	; 80
 608-  FC7E: 17312017   HEX 17312017	; 84
 609-  FC82: 20313220   HEX 20313220	; 88
 610-  FC86: 31171717   HEX 31171717	; 8C
 611-  FC8A: 17171717   HEX 17171717	; 90
 612-  FC8E: 17171731   HEX 17171731	; 94
 613-  FC92: 31311717   HEX 31311717	; 98
 614-  FC96: 17171717   HEX 17171717	; 9C
 615-  FC9A: 20202017   HEX 20202017	; A0
 616-  FC9E: 20202017   HEX 20202017	; A4
 617-  FCA2: 20203131   HEX 20203131	; A8
 618-  FCA6: 31321616   HEX 31321616	; AC
 619-  FCAA: 17171717   HEX 17171717	; B0
 620-  FCAE: 17313117   HEX 17313117	; B4
 621-  FCB2: 31313231   HEX 31313231	; B8
 622-  FCB6: 17323217   HEX 17323217	; BC
 623-  FCBA: 23172317   HEX 23172317	; C0
 624-  FCBE: 23162316   HEX 23162316	; C4
 625-  FCC2: 23172323   HEX 23172323	; C8
 626-  FCC6: 23231717   HEX 23231717	; CC
 627-  FCCA: 24312431   HEX 24312431	; D0
 628-  FCCE: 24312431   HEX 24312431	; D4
 629-  FCD2: 24312431   HEX 24312431	; D8
 630-  FCD6: 24312431   HEX 24312431	; DC
 631-  FCDA: 24171717   HEX 24171717	; E0
 632-  FCDE: 17171717   HEX 17171717	; E4
 633-  FCE2: 16171617   HEX 16171617	; E8
 634-  FCE6: 17171617   HEX 17171617	; EC
 635-  FCEA: 17171717   HEX 17171717	; F0
 636-  FCEE: 17171717   HEX 17171717	; F4
 637-  FCF2: 17171717   HEX 17171717	; F8
 638-  FCF6: 17171717   HEX 17171717	; FC
 639-            
 640-  FCFA: 6C9C9C9C   .OFFSET		HEX 6C9C9C9C	; 00		OFFSET TO LABEL
 641-  FCFE: 9C9C9C90   HEX 9C9C9C90	; 04
 642-  FD02: 9C9C9C9C   HEX 9C9C9C9C	; 08
 643-  FD06: 9C9C9C9C   HEX 9C9C9C9C	; 0C
 644-  FD0A: 8D8A8784   HEX 8D8A8784	; 10
 645-  FD0E: 819C9C9C   HEX 819C9C9C	; 14
 646-  FD12: 9C9C9C9C   HEX 9C9C9C9C	; 18
 647-  FD16: 9C9C9C9C   HEX 9C9C9C9C	; 1C
 648-  FD1A: 309C9C9C   HEX 309C9C9C	; 20
 649-  FD1E: 9C9C9693   HEX 9C9C9693	; 24
 650-  FD22: 63759C9C   HEX 63759C9C	; 28
 651-  FD26: 9C9C9C9C   HEX 9C9C9C9C	; 2C
 652-  FD2A: 9C9C9C78   HEX 9C9C9C78	; 30
 653-  FD2E: 2D2A7B9C   HEX 2D2A7B9C	; 34
 654-  FD32: 9C9C9C9C   HEX 9C9C9C9C	; 38
 655-  FD36: 7E669C9C   HEX 7E669C9C	; 3C
 656-  FD3A: 9C9C9C9C   HEX 9C9C9C9C	; 40
 657-  FD3E: 9C2D2A9C   HEX 9C2D2A9C	; 44
 658-  FD42: 9C9C9C9C   HEX 9C9C9C9C	; 48
 659-  FD46: 339C9C9C   HEX 339C9C9C	; 4C
 660-  FD4A: 9C9C9C9C   HEX 9C9C9C9C	; 50
 661-  FD4E: 69999C9C   HEX 69999C9C	; 54
 662-  FD52: 9C9C9C9C   HEX 9C9C9C9C	; 58
 663-  FD56: 9C9C9C9C   HEX 9C9C9C9C	; 5C
 664-  FD5A: 6F009C21   HEX 6F009C21	; 60
 665-  FD5E: 9C9C9C9C   HEX 9C9C9C9C	; 64
 666-  FD62: 9C9C9C9C   HEX 9C9C9C9C	; 68
 667-  FD66: 9C9C9C9C   HEX 9C9C9C9C	; 6C
 668-  FD6A: 9C9C9C9C   HEX 9C9C9C9C	; 70
 669-  FD6E: 9C9C9C9C   HEX 9C9C9C9C	; 74
 670-  FD72: 9C9C9C9C   HEX 9C9C9C9C	; 78
 671-  FD76: 9C9C9C9C   HEX 9C9C9C9C	; 7C
 672-  FD7A: 9C9C9C9C   HEX 9C9C9C9C	; 80
 673-  FD7E: 9C1B1B9C   HEX 9C1B1B9C	; 84
 674-  FD82: 1818181E   HEX 1818181E	; 88
 675-  FD86: 1E9C9C9C   HEX 1E9C9C9C	; 8C
 676-  FD8A: 9C9C9C9C   HEX 9C9C9C9C	; 90
 677-  FD8E: 9C9C9C15   HEX 9C9C9C15	; 94
 678-  FD92: 120F9C9C   HEX 120F9C9C	; 98
 679-  FD96: 9C9C9C9C   HEX 9C9C9C9C	; 9C
 680-  FD9A: 0F12159C   HEX 0F12159C	; A0
 681-  FD9E: 0C09069C   HEX 0C09069C	; A4
 682-  FDA2: 03000003   HEX 03000003	; A8
 683-  FDA6: 06005D60   HEX 06005D60	; AC
 684-  FDAA: 9C9C9C9C   HEX 9C9C9C9C	; B0
 685-  FDAE: 9C09279C   HEX 9C09279C	; B4
 686-  FDB2: 24210C0C   HEX 24210C0C	; B8
 687-  FDB6: 9C21099C   HEX 9C21099C	; BC
 688-  FDBA: 009C039C   HEX 009C039C	; C0
 689-  FDBE: 065A2157   HEX 065A2157	; C4
 690-  FDC2: 249C2718   HEX 249C2718	; C8
 691-  FDC6: 1B1E9C9C   HEX 1B1E9C9C	; CC
 692-  FDCA: 36363939   HEX 36363939	; D0
 693-  FDCE: 3C3C3F3F   HEX 3C3C3F3F	; D4
 694-  FDD2: 42424545   HEX 42424545	; D8
 695-  FDD6: 48484B4B   HEX 48484B4B	; DC
 696-  FDDA: 4E9C9C9C   HEX 4E9C9C9C	; E0
 697-  FDDE: 9C9C9C9C   HEX 9C9C9C9C	; E4
 698-  FDE2: 519C729C   HEX 519C729C	; E8
 699-  FDE6: 9C9C549C   HEX 9C9C549C	; EC
 700-  FDEA: 9C9C9C9C   HEX 9C9C9C9C	; F0
 701-  FDEE: 9C9C9C9C   HEX 9C9C9C9C	; F4
 702-  FDF2: 9C9C9C9C   HEX 9C9C9C9C	; F8
 703-  FDF6: 9C9C9C9C   HEX 9C9C9C9C	; FC
 704-            
 705-  FDFA: 4C44414C44584C4459414443534243414E444F5241   .LABELS ASC 'LDALDXLDYADCSBCANDORA'	; OPCODE LABELS
 706-  FE0F: 454F52434D50435058435059535441535458535459   ASC 'EORCMPCPXCPYSTASTXSTY'
 707-  FE24: 494E434445434A53524A4D50424E45424551424343   ASC 'INCDECJSRJMPBNEBEQBCC'
 708-  FE39: 424C54424754424353424E4742504C425241494E58   ASC 'BLTBGTBCSBNGBPLBRAINX'
 709-  FE4E: 494E59444558444559494E41444341524F4C504C41   ASC 'INYDEXDEYINADCAROLPLA'
 710-  FE63: 434C4342524B5254534E4F50525348504850504C50   ASC 'CLCBRKRTSNOPRSHPHPPLP'
 711-  FE78: 504841544158544159545841545941545853545358   ASC 'PHATAXTAYTXATYATXSTSX'
 712-  FE8D: 524F524C53485345433F3F3F                     ASC 'RORLSHSEC???'
 713-            
 714-  FE99: A9 03       .CHANGE		LDA #03
 715-  FE9B: A8 01       LDX #01
 716-  FE9D: 20 F9 DD    JSR _NUMBER					; CONVERT ADDRESS
 717-  FEA0: C0 05       LDA $05
 718-  FEA2: D3 FA 90    BEQ GARBAGE
 719-  FEA5: 20 FF 64    .AGAINC		JSR ADDR1					; DISPLAY PRESENT VALUE
 720-  FEA8: A9 20       LDA #20
 721-  FEAA: 20 F8 76    JSR _COUT
 722-  FEAD: 20 F8 76    JSR _COUT
 723-  FEB0: 20 F8 89    JSR _INPUT1					; GET A LINE, NO PROMPT
 724-  FEB3: A9 03       LDA >TEXT
 725-  FEB5: A8 00       LDX <TEXT
 726-  FEB7: 20 F9 28    JSR _UPPER					; MAKE IT UPPERCASE
 727-  FEBA: AA 03 00    LDA TEXT
 728-  FEBD: 88 00       CMP #00
 729-  FEBF: D3 FE FB    BEQ NXTBYTE
 730-  FEC2: 88 21       CMP #21
 731-  FEC4: D3 FF 0D    BEQ DONEC					; EXIT ON '!' CHARACTER
 732-  FEC7: A9 03       LDA >TEXT
 733-  FEC9: A8 00       LDX <TEXT
 734-  FECB: C6 06       STA $06
 735-  FECD: C8 07       STX $07
 736-  FECF: A8 00       LDX #00
 737-  FED1: 20 F9 89    JSR _LENGTH
 738-  FED4: 86 01       CPX #01
 739-  FED6: D1 FE EF    BNE DOUBLE
 740-  FED9: A8 00       LDX #00						; SINGLE DIGIT
 741-  FEDB: 61 00 06    LDA ($0006),X
 742-  FEDE: E8          INX
 743-  FEDF: 63 00 06    STA ($0006),X
 744-  FEE2: A9 00       LDA #00
 745-  FEE4: E8          INX
 746-  FEE5: 63 00 06    STA ($0006),X
 747-  FEE8: A8 00       LDX #00
 748-  FEEA: A9 30       LDA #30
 749-  FEEC: 63 00 06    STA ($0006),X
 750-  FEEF: A8 00       .DOUBLE		LDX #00
 751-  FEF1: 20 F9 C3    JSR _MAKEBYTE
 752-  FEF4: C0 04       LDA $04
 753-  FEF6: A8 00       LDX #00
 754-  FEF8: 63 00 01    STA ($0001),X				; PUT IN MEMORY
 755-  FEFB: 54          .NXTBYTE	CLC
 756-  FEFC: A9 01       LDA #01
 757-  FEFE: B5 00 02    ADC $0002
 758-  FF01: C6 02       STA $02
 759-  FF03: A9 00       LDA #00
 760-  FF05: B5 00 01    ADC $0001
 761-  FF08: C6 01       STA $01
 762-  FF0A: 4C FE A5    JMP AGAINC
 763-  FF0D: 60          .DONEC		RTS
 764-            
 765-  FF0E: A9 03       .DUMP		LDA #03
 766-  FF10: A8 01       LDX #01
 767-  FF12: 20 F9 DD    JSR _NUMBER					; CONVERT ADDRESS
 768-  FF15: C0 05       LDA $05
 769-  FF17: D3 FA 90    BEQ GARBAGE					; CONVERSION ERROR
 770-  FF1A: A6 0A       LDY #0A						; DUMP TEN LINES
 771-  FF1C: CA 04       STY $04
 772-  FF1E: C0 01       .NEXTLINE	LDA $01
 773-  FF20: C2 02       LDX $02
 774-  FF22: 20 F9 20    JSR _PRINTWORD
 775-  FF25: A9 2D       LDA #2D
 776-  FF27: 20 F8 76    JSR _COUT
 777-  FF2A: A6 08       LDY #08
 778-  FF2C: A8 00       LDX #00
 779-  FF2E: 61 00 01    .NEXTBYTE	LDA ($0001),X				; GET VALUE
 780-  FF31: 20 F8 E9    JSR _PRINTHEX
 781-  FF34: A9 20       LDA #20
 782-  FF36: 20 F8 76    JSR _COUT
 783-  FF39: E8          INX 
 784-  FF3A: C5          DEY
 785-  FF3B: D1 FF 2E    BNE NEXTBYTE
 786-  FF3E: A9 0D       LDA #0D
 787-  FF40: 20 F8 76    JSR _COUT
 788-  FF43: 45 00 04    DEC $0004
 789-  FF46: C0 04       LDA $04
 790-  FF48: 88 00       CMP #00
 791-  FF4A: D3 FF 7E    BEQ DONE4
 792-  FF4D: A9 00       LDA #00
 793-  FF4F: C6 0A       STA $0A
 794-  FF51: A9 08       LDA #08
 795-  FF53: C6 0B       STA $0B
 796-  FF55: 20 FA 50    JSR _ADD16					; INCREMENT ADDRESS
 797-  FF58: 4C FF 1E    JMP NEXTLINE
 798-            
 799-  FF5B: 20 FF 64    .ADDR		JSR ADDR1
 800-  FF5E: A9 0D       LDA #0D
 801-  FF60: 20 F8 76    JSR _COUT
 802-  FF63: 60          RTS
 803-            
 804-  FF64: C0 01       .ADDR1		LDA $01						; SINGLE ADDRESS
 805-  FF66: C2 02       LDX $02
 806-  FF68: 20 F9 20    JSR _PRINTWORD
 807-  FF6B: A9 2D       LDA #2D
 808-  FF6D: 20 F8 76    JSR _COUT
 809-  FF70: A8 00       LDX #00
 810-  FF72: 61 00 01    LDA ($0001),X
 811-  FF75: 20 F8 E9    JSR _PRINTHEX
 812-  FF78: 60          RTS
 813-            
 814-  FF79: A9 0C       .HOME		LDA #0C						; HOME - CLEAR THE SCREEN
 815-  FF7B: 20 F8 76    JSR _COUT
 816-  FF7E: 60          .DONE4		RTS
 817-            
 818-             ;
 819-             ;	_REG	OUTPUTS THE CURRENT REGISTER VALUES.
 820-             ;
 821-            
 822-  FF7F: C6 0A       ._REG		STA $0A						; SAVE THE A
 823-  FF81: 12          TXA
 824-  FF82: C6 0B       STA $0B						; SAVE THE X
 825-  FF84: 11          TYA
 826-  FF85: C6 0C       STA $0C						; SAVE THE Y
 827-  FF87: A9 FF       LDA >STRY					; MESSAGE
 828-  FF89: A8 91       LDX <STRY
 829-  FF8B: 20 F8 D2    JSR _PRINT
 830-  FF8E: 4C FF 95    JMP NXT
 831-  FF91: 593D20   .STRY		ASC 'Y= '
 832-  FF94: 00   HEX 00
 833-  FF95: C0 0C       .NXT		LDA $0C
 834-  FF97: 20 F8 E9    JSR _PRINTHEX
 835-  FF9A: A8 02       LDX #02
 836-  FF9C: 20 FF D8    JSR _BLANKS
 837-  FF9F: A9 FF       LDA >STRX
 838-  FFA1: A8 A9       LDX <STRX
 839-  FFA3: 20 F8 D2    JSR _PRINT
 840-  FFA6: 4C FF AD    JMP NXT2
 841-  FFA9: 583D20   .STRX		ASC 'X= '
 842-  FFAC: 00   HEX 00
 843-  FFAD: C0 0B       .NXT2		LDA $0B
 844-  FFAF: 20 F8 E9    JSR _PRINTHEX
 845-  FFB2: A8 02       LDX #02
 846-  FFB4: 20 FF D8    JSR _BLANKS
 847-  FFB7: A9 FF       LDA >STRA
 848-  FFB9: A8 C1       LDX <STRA
 849-  FFBB: 20 F8 D2    JSR _PRINT
 850-  FFBE: 4C FF C5    JMP NXT3
 851-  FFC1: 413D20   .STRA		ASC 'A= '
 852-  FFC4: 00   HEX 00
 853-  FFC5: C0 0A       .NXT3		LDA $0A
 854-  FFC7: 20 F8 E9    JSR _PRINTHEX
 855-  FFCA: A9 0D       LDA #0D
 856-  FFCC: 20 F8 76    JSR _COUT
 857-  FFCF: C0 0C       LDA $0C							; RESTORE REGISTERS
 858-  FFD1: 13          TAY
 859-  FFD2: C0 0B       LDA $0B
 860-  FFD4: 14          TAX
 861-  FFD5: C0 0A       LDA $0A
 862-  FFD7: 60          RTS
 863-            
 864-             ;
 865-             ; _BLANKS	OUTPUT BLANKS, NUMBER IN X.  DESTROYS A.
 866-             ;
 867-            
 868-  FFD8: A9 20       ._BLANKS	LDA #20
 869-  FFDA: 20 F8 76    .LOOPBL		JSR _COUT
 870-  FFDD: C7          DEX
 871-  FFDE: D3 FF E4    BEQ DONEBL
 872-  FFE1: 4C FF DA    JMP LOOPBL
 873-  FFE4: 60          .DONEBL		RTS
 874-            
 875-            
 876-            
 
Symbol Table
 
[0200] KOUT        [0201] CSTB        [0202] KBDS        [0203] KEYB        
[0100] STAK        [FFFD] COLD        [FFFA] BREAK       [0300] TEXT        
[0000] ZERO        [F800] _MON        [F80F] MESSAGE     [F830] VERSION     
[F832] _MON1       [F851] _BRK        [F85E] STRNG       [F867] NXTBRK      
[F876] _COUT       [F87D] _KEYIN      [F884] _INPUT      [F889] _INPUT1     
[F88B] LOOP        [F8AA] DEL         [F8BD] DONE        [F8CA] NOCHAR      
[F8D0] FINISH      [F8D1] END         [F8D2] _PRINT      [F8D6] PRINT1      
[F8D8] LOOP2       [F8E8] DONE2       [F8E9] _PRINTHEX   [F8FF] HEX1        
[F905] NEXT        [F917] HEX2        [F91D] END2        [F920] _PRINTWORD  
[F928] _UPPER      [F92C] _UPPER1     [F92E] LOOP3       [F93C] RANGE1      
[F944] RANGE2      [F94A] NEXT2       [F951] DONE3       [F952] _KILLB      
[F956] _KILLB1     [F958] LOOPK       [F96C] SHIFT       [F96F] LOOPS       
[F983] DONES       [F988] DONEK       [F989] _LENGTH     [F98B] LOOPL       
[F998] MAX         [F99A] QUIT        [F99B] _MAKEHEX    [F9B0] DIGIT1      
[F9B8] OK1         [F9BE] ERRM        [F9C2] DONEH       [F9C3] _MAKEBYTE   
[F9DD] _NUMBER     [F9E1] _NUMBER1    [FA02] ONEN        [FA13] TWON        
[FA23] THREEN      [FA38] FOURN       [FA4C] ERRORN      [FA4F] DONEN       
[FA50] _ADD16      [FA60] _EXECUTE    [FA90] GARBAGE     [FA9B] GO          
[FAAB] LIST        [FAC0] LOOPLIST    [FB28] ONEBYTE     [FB30] TWOBYTE     
[FB42] PRINTLABEL  [FB7F] IMPLIED     [FB82] IMMEDIATE   [FB92] ABSOLUTE    
[FBA1] ABS.X       [FBBA] ZEROPAGE    [FBC7] RELATIVE    [FBCA] INDIRECT    
[FBEA] NXTINSTR    [FBF9] DONELIST    [FBFA] TYPE        [FCFA] OFFSET      
[FDFA] LABELS      [FE99] CHANGE      [FEA5] AGAINC      [FEEF] DOUBLE      
[FEFB] NXTBYTE     [FF0D] DONEC       [FF0E] DUMP        [FF1E] NEXTLINE    
[FF2E] NEXTBYTE    [FF5B] ADDR        [FF64] ADDR1       [FF79] HOME        
[FF7E] DONE4       [FF7F] _REG        [FF91] STRY        [FF95] NXT         
[FFA9] STRX        [FFAD] NXT2        [FFC1] STRA        [FFC5] NXT3        
[FFD8] _BLANKS     [FFDA] LOOPBL      [FFE4] DONEBL      
